package com.yunhe.inspect.repository;

import com.yunhe.inspect.domain.RectificationSheet;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * @ClassName: RectificationSheetRepository
 * @Description:
 * @author: GongDaCheng
 * @Date: 9:20 2021/11/15
 */
@Repository
public interface RectificationSheetRepository {

    /**
     * 新增
     * @author
     * @date 2021/11/15
     **/
    int createRectificationSheet(RectificationSheet rectificationSheet);

    /**
     * 新增
     * @author
     * @date 2021/11/15
     **/
    int createRectificationSheetSelective(RectificationSheet rectificationSheet);

    /**
     * 刪除
     * @author
     * @date 2021/11/15
     **/
    int deleteRectificationSheetByPrimaryKey(@Param("id") int id);

    /**
     * 更新
     * @author
     * @date 2021/11/15
     **/
    int updateRectificationSheetByPrimaryKey(RectificationSheet rectificationSheet);

    /**
     * 更新
     * @author
     * @date 2021/11/15
     **/
    int updateRectificationSheetByPrimaryKeySelective(RectificationSheet rectificationSheet);

    /**
     * 根据主键查询
     * @author
     * @date 2021/11/15
     **/
    RectificationSheet searchRectificationSheetByPrimaryKey(@Param("id") Long id);

    RectificationSheet getLatestRectificationSheetByInspectOrderId(@Param("inspectOrderId") int inspectOrderId);

    /**
     * 根据巡检单号获取历史整改记录
     * */
    List<RectificationSheet> getRectificationHistoryByInspectOrderId(@Param("inspectOrderId") int inspectOrderId);


    /**
     * 根据inspectOrderId查询
     * @author GDC‘s Neighbor
     * @date 2021/11/15
     **/
    List<RectificationSheet> searchRectificationSheetByInspectOrderId(@Param("inspectOrderId") Long inspectOrderId);
}
